/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pl.edu.agh.lasil.driver;

import java.util.Date;
import java.util.Random;

import megamu.mesh.Voronoi;

/**
 * 
 * @author Adam
 */
public class VDriver {

	public Voronoi myVoronoi = null;

	public VDriver() {
		int n = 200;
		Random r = new Random((new Date()).getTime());
		float[][] points = new float[n][2];

		for (int i = 0; i < n; i++) {

//			points[i][0] = (float) 10 + r.nextInt(700); // first point, x
//			points[i][1] = (float) 10 + r.nextInt(600); // first point, y

			points[i][0] = (float) 70*(i/20)+ r.nextInt(30); // first point, x
			points[i][1] = (float) 50*(i%20)+ r.nextInt(1+((int)points[i][0]) %30); // first point, y
			
			
		}


		myVoronoi = new Voronoi(points);
	
		
		try {
			myVoronoi.stretchRegions((float) 0.8);
		} catch (Exception e) {
			//
			e.printStackTrace();
		}

	
		
	}
}
